cmake_minimum_required(VERSION 3.19)
project(InsCubeDecoder)

set(CMAKE_CXX_STANDARD 14)

find_package(fmt REQUIRED)
find_package(glog REQUIRED)
find_package(gflags REQUIRED)
add_compile_options(-fshort-enums)
add_executable(InsCubeDecoder main.cpp Decoder.cpp AdiHandle.cpp HandleBase.cpp RstHandle.cpp)
target_link_libraries(InsCubeDecoder fmt pthread glog gflags)
set_target_properties(InsCubeDecoder PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE)
install(TARGETS InsCubeDecoder
        RUNTIME   DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
        )